import request from '@/utils/request'

const base = {
  add (data) {
    return request.post('/kpzh/popularScienceBase/add', data)
  },
  update (data) {
    return request.post('/kpzh/popularScienceBase/update', data)
  },
  edit (data) {
    return request.post('/kpzh/popularScienceBase/edit', data)
  },
  getAll (id) {
    return request.get(`/kpzh/popularScienceBase/allDetail/${id}`)
  },
  deleteBase (id) {
    return request.post(`/kpzh/popularScienceBase/delete/${id}`)
  },
  list (params) {
    return request.get('/kpzh/popularScienceBase/list', { params })
  },
  myList (params) {
    return request.get('/kpzh/popularScienceBase/myList', { params })
  },
  get (id) {
    return request.get(`/kpzh/popularScienceBase/detail/${id}`)
  },
  submit (data) {
    return request.post(`/kpzh/popularScienceBase/submit`, data)
  },
  surveyGet (id) {
    return request.get(`/kpzh/popularScienceBaseSurvey/detail/${id}`)
  },
  surveyGetBy (id) {
    return request.get(`/kpzh/popularScienceBaseSurvey/getByBaseId/${id}`)
  },
  surveyUpdate (data) {
    return request.post(`/kpzh/popularScienceBaseSurvey/update`, data)
  },
  surveyAdd (data) {
    return request.post(`/kpzh/popularScienceBaseSurvey/add`, data)
  },
  contentAdd (data) {
    return request.post(`/kpzh/popularScienceBaseContent/add`, data)
  },
  contentUpdate (data) {
    return request.post(`/kpzh/popularScienceBaseContent/update`, data)
  },
  contentGet (id) {
    return request.get(`/kpzh/popularScienceBaseContent/detail/${id}`)
  },
  contentGetBy (id) {
    return request.get(`/kpzh/popularScienceBaseContent/getByBaseId/${id}`)
  },
  picAddList (data) {
    return request.post(`/kpzh/popularScienceBasePicture/addList`, data)
  },
  picAdd (data) {
    return request.post(`/kpzh/popularScienceBasePicture/add`, data)
  },
  picDelete (id) {
    return request.post(`/kpzh/popularScienceBasePicture/delete/${id}`)
  },
  pictureList (id) {
    return request.get(`/kpzh/popularScienceBasePicture/getByBaseId/${id}`)
  },
  publicityAdd (data) {
    return request.post(`/kpzh/popularScienceBasePublicity/add`, data)
  },
  publicityAddList (data) {
    return request.post(`/kpzh/popularScienceBasePublicity/addList`, data)
  },
  publicityList (id) {
    return request.get(`/kpzh/popularScienceBasePublicity/getByBaseId/${id}`)
  },
  publicityDelete (id) {
    return request.post(`/kpzh/popularScienceBasePublicity/delete/${id}`)
  },
  commentaryDetail (id) {
    return request.get(`/kpzh/popularScienceBaseCommentary/detail/${id}`)
  },
  commentaryBy (id) {
    return request.get(`/kpzh/popularScienceBaseCommentary/getByBaseId/${id}`)
  },
  commentaryAdd (data) {
    return request.post('/kpzh/popularScienceBaseCommentary/add', data)
  },
  commentaryEdit (data) {
    return request.post('/kpzh/popularScienceBaseCommentary/update', data)
  },
  rewardAdd (data) {
    return request.post('/kpzh/popularScienceBaseReward/add', data)
  },
  rewardAddList (data) {
    return request.post('/kpzh/popularScienceBaseReward/addList', data)
  },

  rewardEdit (data) {
    return request.post('/kpzh/popularScienceBaseReward/update', data)
  },
  rewardDelete (id) {
    return request.post(`/kpzh/popularScienceBaseReward/delete/${id}`)
  },
  rewardList (id) {
    return request.get(`/kpzh/popularScienceBaseReward/getByBaseId/${id}`)
  },
  activityAdd (data) {
    return request.post('/kpzh/popularScienceBaseActivity/add', data)
  },
  activityAddList (data) {
    return request.post('/kpzh/popularScienceBaseActivity/addList', data)
  },
  activityEdit (data) {
    return request.post('/kpzh/popularScienceBaseActivity/update', data)
  },
  activityDelete (id) {
    return request.post(`/kpzh/popularScienceBaseActivity/delete/${id}`)
  },
  activityList (id) {
    return request.get(`/kpzh/popularScienceBaseActivity/getByBaseId/${id}`)
  },

  getMyKpzhMessage () {
    return request.get(`/system/sysMessage/getMyKpzhMessage`)
  },
  readMsg (id) {
    return request.post(`/system/sysMessage/read/${id}`)
  },
  getMyKpzhPicMessage () {
    return request.get(`/system/sysMessage/getMyKpzhPicMessage`)
  }
}

export default base;
